/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.Util;

import com.Model.TipoCampo;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
import javax.faces.convert.FacesConverter;

/**
 *
 * @author Fellipe
 */
@FacesConverter("TipoCampoConveter")
public class TipoCampoConverter implements Converter{

    @Override
    public Object getAsObject(FacesContext fc, UIComponent uic, String string) {
        System.out.println(fc.toString());
        System.out.println(uic.toString());
        System.out.println(string);
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public String getAsString(FacesContext fc, UIComponent uic, Object o) {
        System.out.println(fc.toString());
        System.out.println(uic.toString());
        TipoCampo tc = (TipoCampo) o;
        System.out.println(tc.getDescricao());
        System.out.println(tc.getChaveTipoCampo());
        throw new UnsupportedOperationException("Not supported yet2.");
    }
    
}
